package com.binest.hackathonInclusionMain.service.impl;

import java.util.List;
import com.binest.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.binest.hackathonInclusionMain.mapper.HackathonInclusionMainMapper;
import com.binest.hackathonInclusionMain.domain.HackathonInclusionMain;
import com.binest.hackathonInclusionMain.service.IHackathonInclusionMainService;

/**
 * 黑客马拉松收录主Service业务层处理
 * 
 * @author wwd
 * @date 2024-01-19
 */
@Service
public class HackathonInclusionMainServiceImpl implements IHackathonInclusionMainService 
{
    @Autowired
    private HackathonInclusionMainMapper hackathonInclusionMainMapper;

    /**
     * 查询黑客马拉松收录主
     * 
     * @param id 黑客马拉松收录主主键
     * @return 黑客马拉松收录主
     */
    @Override
    public HackathonInclusionMain selectHackathonInclusionMainById(String id)
    {
        return hackathonInclusionMainMapper.selectHackathonInclusionMainById(id);
    }

    /**
     * 查询黑客马拉松收录主列表
     * 
     * @param hackathonInclusionMain 黑客马拉松收录主
     * @return 黑客马拉松收录主
     */
    @Override
    public List<HackathonInclusionMain> selectHackathonInclusionMainList(HackathonInclusionMain hackathonInclusionMain)
    {
        return hackathonInclusionMainMapper.selectHackathonInclusionMainList(hackathonInclusionMain);
    }

    /**
     * 新增黑客马拉松收录主
     * 
     * @param hackathonInclusionMain 黑客马拉松收录主
     * @return 结果
     */
    @Override
    public int insertHackathonInclusionMain(HackathonInclusionMain hackathonInclusionMain)
    {
        hackathonInclusionMain.setCreateTime(DateUtils.getNowDate());
        return hackathonInclusionMainMapper.insertHackathonInclusionMain(hackathonInclusionMain);
    }

    /**
     * 修改黑客马拉松收录主
     * 
     * @param hackathonInclusionMain 黑客马拉松收录主
     * @return 结果
     */
    @Override
    public int updateHackathonInclusionMain(HackathonInclusionMain hackathonInclusionMain)
    {
        hackathonInclusionMain.setUpdateTime(DateUtils.getNowDate());
        return hackathonInclusionMainMapper.updateHackathonInclusionMain(hackathonInclusionMain);
    }

    /**
     * 批量删除黑客马拉松收录主
     * 
     * @param ids 需要删除的黑客马拉松收录主主键
     * @return 结果
     */
    @Override
    public int deleteHackathonInclusionMainByIds(String[] ids)
    {
        return hackathonInclusionMainMapper.deleteHackathonInclusionMainByIds(ids);
    }

    /**
     * 删除黑客马拉松收录主信息
     * 
     * @param id 黑客马拉松收录主主键
     * @return 结果
     */
    @Override
    public int deleteHackathonInclusionMainById(String id)
    {
        return hackathonInclusionMainMapper.deleteHackathonInclusionMainById(id);
    }

    @Override
    public int addLikeCount(String id) {
        return hackathonInclusionMainMapper.addLikeCount(id);
    }

    @Override
    public int reduceLikeCount(String id) {
        return hackathonInclusionMainMapper.reduceLikeCount(id);
    }

    @Override
    public int addNoLikeCount(String id) {
        return hackathonInclusionMainMapper.addNoLikeCount(id);
    }

    @Override
    public int reduceNoLikeCount(String id) {
        return hackathonInclusionMainMapper.reduceNoLikeCount(id);
    }
}
